<template>
    <div id='help'>
        <div>
            <div class='help-title'>使用帮助</div>
            <div class='help-paragraph'>产品简介</div>
            <div>1.年满18周岁及以上，苹果手机为6s及以上，通过实名认证且已绑定银行卡的用户可申请（不支持在校学生申请）；</div>
            <div>2.本产品是信用借款，根据手机型号及用户的风控评分确定最终可借金额；</div>
            <div>3.用户若违约，本公司有权将违约相关信息上报至芝麻信用平台；</div>
            <div>4.在申请资料齐全的情况下，请您耐心等待，会在24小时内给您审核结果。</div>
            <div class='help-paragraph'>审核及放款问题</div>
            <div>1.进入审核中状态后，请保证电话畅通，以免错误过公司审核人员的电话；</div>
            <div>2.如未能通过公司的审核，您可以在冻结期结束后重新申请；</div>
            <div>3.请您完全按照公司审核人员的指引操作。如因操作不当引起的通讯录及资料丢失等，责任由您本人承担；</div>
            <div>4.放款后，款项到账时间与银行系统的处理时间相关，请您耐心等待。</div>
            <div class='help-paragraph'>还款问题</div>
            <div>1.请您在借款到期时在您绑定的银行卡账户存入还款相应的款项后，在应用内进行主动还款</div>
            <div>2.您可以随时在应用中进行还款操作，如需采用其他还款方式，请联系我们的在线客服。</div>
        </div>
    </div>
</template>

<script>
    import { Promise } from 'es6-promise'
    import footerBar from '../components/FooterBar.vue'
    import selectGroup from '../components/SelectGroup.vue'
    import selectOption from '../components/SelectOption.vue'
    import radioGroup from '../components/RadioGroup.vue'
    import radio from '../components/Radio.vue'
    import checkBox from '../components/CheckBox.vue'
    import { getOS } from '../utils/utils'
    import  { mapGetters, mapActions }  from 'vuex'


    export default {
        components:{
            footerBar,
            selectGroup,
            selectOption,
            radioGroup,
            radio,
            checkBox
        },
        methods:{
            // actions
            ...mapActions([
                'showLoading',
                'hideLoading',
                'setMsgTip',
                'setMsgTipStyle',
                'setSessionId',
            ]),
            currentRouter(item){
                let routerArr = this.$route.matched
                let matchRouter = _.some(routerArr,['name',item.router])
                return matchRouter
            },
            goRouter(item,isSub){
                let thisRouter
                let routers = item.subRouters

                if(isSub === 'sub'){
                    if(this.$route.name == item) return
                    this.$router.push(item)
                    return
                }

                if(routers.length > 1){
                    item.opened = !item.opened
                    return
                }

                thisRouter = routers[0]
                if(this.$route.name == thisRouter.name) return
                this.$router.push(thisRouter)
            },
            goLogin(){
                this.setSessionId('')
                this.$router.push({
                    name:'login'
                })
            }
        },
        data() {
            return {
                isWeb:process.env.NODE_ENV == 'web',
                os:getOS(),
                placeholder:'--',
                showModal:false,
                selectBox:'大雨',
                radioBox:'123',
                checkBox:true,
                sideBarList:[[{
                    text:'用户',
                    router:'user',
                    opened:false,
                    subRouters:[{
                        name:'user-index'
                    }],
                    iconClass:'icon-user'
                },{
                    text:'订单',
                    router:'order',
                    opened:false,
                    subRouters:[{
                        name:'order-index'
                    }],
                    iconClass:'icon-evaluate'
                },{
                    text:'交易分析',
                    router:'transaction',
                    opened:false,
                    subRouters:[{
                        name:'transaction-analysis'
                    }],
                    iconClass:'icon-statistics'
                },{
                    text:'贷款导流',
                    router:'loan',
                    opened:true,
                    subRouters:[{
                        name:'loan-index',
                    }],
                    iconClass:'icon-finance'
                }]]
            }
        },
        computed:{
            ...mapGetters([
                'loading',
                'msgTip',
                'localInfo',
            ]),
            admin(){
                return this.localInfo.admin
            },
            sessionId(){
                return this.localInfo.sessionId
            },
            needLogin(){
                return this.localInfo.needLogin
            },
            routerAnimation(){
                return this.localInfo.routerAnimation
            },
            routerAnim(){
                if(this.os == 'Android'){
                    return ''
                }
                if(this.os != 'Android'){
                    return this.routerAnimation
                }
            },
            routerMode(){
                if(this.os == 'Android'){
                    return 'out-in'
                }
                if(this.os != 'Android'){
                    return ''
                }
            }
        },
        created(){
            // this.setMsgTipStyle({ top:'100px' })
        },
        watch: {
            'needLogin'(newVal,oldVal){
                if(newVal == oldVal) return
                if(newVal === true)
                this.$router.replace({
                    name:'login'
                })
            }
        }
    }
</script>

<style lang="scss">
    @import "../sass/variables";
    @import "../sass/extends";
    @import "../sass/mixins";

    #help{
        background-color: #fff;
        padding:16px;
        @extend %font-caption;
        text-indent:2em;
       .help-paragraph{
            @extend %font-body2;
            text-indent: 0;
            font-weight: normal;
            padding-top: 15px;
        }
        .help-title{
            @extend %font-title;
            font-weight: normal;
            text-align: center;
            padding-top: 35px;
            color:$importColor;
            text-indent: 0;
        }
    }
</style>
